Page({
  data: {
    username: '',
    key:''
  },
  onLoad: function (options) {
    if (options.username) {
      this.setData({
        username: options.username
      });
    } else {
      const loginUsername = wx.getStorageSync('loginUsername');
      const code = wx.getStorageSync('rescueCode');
      if (loginUsername) {
        this.setData({
          username: loginUsername,
          key:code
        });
      }
      
    }
  }
});